package com.bitters.core.controller;

import com.bitters.core.exception.BizRuntimeException;
import com.bitters.enums.ErrorCodeAndMsg;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author thomashe
 * @date 2023/10/20/ 16:29
 * @description
 */
@RestController
@RequestMapping("/ex")
public class FooController {
    /**
     * 普通Exception处理，全局都交给BizRuntimeException处理
     *
     * @return
     */
    @RequestMapping("/foo")
    public String foo() {
        throw new BizRuntimeException(ErrorCodeAndMsg.Network_error);
    }
}
